<%@ page import="org.jasig.cas.client.validation.Assertion" %>
<%@ page import="org.jasig.cas.client.util.AssertionHolder" %>
<%@ page import="org.jasig.cas.client.authentication.AttributePrincipal" %>
<%@ page import="java.util.Map" %><%--
  Created by IntelliJ IDEA.
  User: 123
  Date: 2018/4/11
  Time: 17:54
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<head>
    <title>智能报修系统——故障管理</title>
    <link rel="stylesheet" type="text/css" href="<%= request.getContextPath()%>resources/css/rightDiv.css"/>
    <link rel="stylesheet" type="text/css" href="<%= request.getContextPath()%>resources/css/manager.css"/>
    <!--引入交互所需css-->
    <link rel="stylesheet" type="text/css" href="<%= request.getContextPath()%>resources/css/jNotify.jquery.css"/>
    <%--<script src="<%= request.getContextPath()%>resources/js/manager.js" type="text/javascript" charset="utf-8"></script>--%>

</head>
<body ng-app="managerApp">
<%System.out.println(basePath);%>
<!--头部开始-->
<%
    Assertion assertion = AssertionHolder.getAssertion();

    AttributePrincipal ap =  assertion.getPrincipal();   //获取AttributePrincipal对象，这是客户端对象

    String name = ap.getName();

    Map<String,Object> att = ap.getAttributes();//获取属性值，为一个Map类型。

%>


<div id="head">
    <div id="head_con">
        <p class="title">智能报修系统</p>
        <div class="phoneNum" ng-controller="servicenumCtrl">
            服务电话：
            <span id="servicenum">
					{{servicephone}}
				</span>
        </div>
    </div>

</div>
<!--头部结束-->


<!--左边开始-->
<div id="staffLeft">
    <div id="staffLeftCon">
        <!--管理人员的信息-->
        <div id="staffInfo">
            <!--姓名-->
            <p class="staffName">Administrator</p>
            <!--客服学号-->
            <!--<p class="staffNum">1506111111</p>-->
            <p class="staffNum"><%=name %></p>
            <input type="hidden" class="useraccount" value="<%=name %>"/>
            <!--职位-->
            <p class="place">管理人员</p>
        </div>

        <style>
            #operation a:link,a:visited,a:hover{
                text-decoration: none;
                color:#4e7500;
            }
        </style>
        <div id="operation">
            <ul>
                <a href="/complainli"><li id="complainli"  >投诉管理 </li></a>
                <a href="/tiao1"><li id="createli"  >创建工单</li></a>
                <a href="/ordermanageli"><li id="ordermanageli">工单管理</li></a>
                <a href="/tiao2"> <li id="faultli" class="active" >故障分类管理</li></a>
                <a href="/totalorderli"><li id="totalorderli">工单统计报表</li></a>
                <a href="/yeji"><li id="performancesli">运维人员业绩</li></a>
                <a href="/worktypeli"><li id="worktypeli">运维人员管理</li></a>
                <a href="/guanli"><li id="websiteli" >网站管理</li></a>
            </ul>
        </div>
    </div>
</div>
<!--左边结束-->


<!--右边开始-->
<div id="pushOrdersRight">
    <div id="pushOrdersRight_con">

        <%--class="adjust turndiv" --%>
        <!--职位调整开始-->
        <div id="adjust" ng-controller="managerFaultCtrl">
            <button class="adjustButton" onclick="addKind()">添加分类</button>
            <div style="display:block;" class="allKind" ng-repeat="x in oneLevel">
                <div class=" myin">
                    <span>分类：</span><input ng-click="get(x.oType)" id={{x.oType}} type="text" class="inputStyle"
                                           value={{x.one}} readonly="readonly">
                    <span>负责人：</span><input ng-click="getUser(x.userPhone | limitTo:-6)"
                                            id="{{x.userPhone | limitTo:-6}}" type="text" class="inputStyle"
                                            value={{x.userName}}>
                    <button class="adjustButton" ng-click="updateOne(x.oType,x.userPhone | limitTo:-6)">修改</button>
                    <button class="adjustButton" ng-click="deleteOne(x.oType)">删除</button>
                </div>
        </div>
        <!--职位调整结束-->
            <div id="addKind" class="addKind" style="display:none;">
                &nbsp&nbsp&nbsp分类：<input type="text" id="uc" class="oneCatalogue" ng-model="oneLevelDirectory.one"
                                         placeholder="网络问题"/><br/>
                负责人：<input type="text" class="oneCatalogue" ng-model="oneLevelDirectory.userName" placeholder="运维人员名字"/><br/>
                <button class="sureAddBt" ng-click="add()">确认增加</button>
                <button onclick="closeBox()" class="noAddBt">取消</button>
            </div>

    </div>
</div>
<!--右边结束-->
</div>
<%--<div id="footer" class="footer">--%>
    <%--<p class="footerWord">版权所有&nbsp;四川旅游学院</p>--%>
<%--</div>--%>
<!--引入交互所需文件-->
<script type="text/javascript" src="<%= request.getContextPath()%>resources/js/jquery-3.1.1.min.js"></script>
<script src="<%= request.getContextPath()%>resources/js/angular.min.js" type="text/javascript" charset="utf-8"></script>
<script src="<%= request.getContextPath()%>resources/js/managerController.js" type="text/javascript" charset="utf-8"></script>
<script src="<%= request.getContextPath()%>resources/js/manager.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" src="<%= request.getContextPath()%>resources/js/jNotify.jquery.js"></script>
</body>
</html>
